﻿using LaserMark.Models;
using System.Numerics;

namespace LaserMark.Extensions;

public static class AngleExtension
{
    public static (double angle, double rad) GetAngle(Point first, Point second)
    {
        double slope = (first.Y - second.Y) / (first.X - second.X);
        double angleInRadians = Math.Atan(slope);
        var angleInRadians1 = angleInRadians * (180 / Math.PI);

        return (angleInRadians1, angleInRadians);
    }
}
